// AWTFocusManager.h: interface for the AWTFocusManager class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_AWTFOCUSMANAGER_H__DCE3E987_423F_11D2_A3F2_006097A44215__INCLUDED_)
#define AFX_AWTFOCUSMANAGER_H__DCE3E987_423F_11D2_A3F2_006097A44215__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

#include "AWTObject.h"
class AWTContainer;

class AFX_EXT_CLASS AWTFocusManager : public AWTObject  
{
DECLARE_DYNAMIC(AWTFocusManager)
public:
	AWTFocusManager(AWTContainer* cont);
	virtual ~AWTFocusManager();

	void activateFocus();
	void setFocusOwner(AWTComponent* c) 
		{m_focusOwner = c;}
	AWTComponent* getFocusOwner() 
		{return m_focusOwner;}
	BOOL focusNext() 
		{return focusNext(m_focusOwner);}
	BOOL focusNext(AWTComponent* base);
	BOOL focusPrevious() 
		{return focusPrevious(m_focusOwner);}
	BOOL focusPrevious(AWTComponent* base);
	BOOL assignFocus(AWTComponent* c) 
		{return assignFocus(c, TRUE);}
	BOOL assignFocus(AWTComponent* c, BOOL requireTraversable);
	BOOL focusForward(AWTContainer* c);
	BOOL focusBackward(AWTContainer* c);

protected:
	AWTContainer* m_focusRoot;
	AWTComponent* m_focusOwner;

};

#endif // !defined(AFX_AWTFOCUSMANAGER_H__DCE3E987_423F_11D2_A3F2_006097A44215__INCLUDED_)
